cmake_minimum_required(VERSION 3.5)
project(webrtc_audio_processing LANGUAGES CXX C)

include(../predefined.cmake)

include_directories(./ ../
)

set(AUDIO_PROCESSING_SOURCE_LIST
    ./audio_processing/aec3/adaptive_fir_filter.cc
    ./audio_processing/aec3/adaptive_fir_filter_avx2.cc
    ./audio_processing/aec3/adaptive_fir_filter_erl.cc
    ./audio_processing/aec3/adaptive_fir_filter_erl_avx2.cc
    ./audio_processing/aec3/aec3_common.cc
    ./audio_processing/aec3/aec3_fft.cc
    ./audio_processing/aec3/aec_state.cc
    ./audio_processing/aec3/alignment_mixer.cc
    ./audio_processing/aec3/api_call_jitter_metrics.cc
    ./audio_processing/aec3/block_buffer.cc
    ./audio_processing/aec3/block_delay_buffer.cc
    ./audio_processing/aec3/block_framer.cc
    ./audio_processing/aec3/block_processor.cc
    ./audio_processing/aec3/block_processor_metrics.cc
    ./audio_processing/aec3/clockdrift_detector.cc
    ./audio_processing/aec3/coarse_filter_update_gain.cc
    ./audio_processing/aec3/comfort_noise_generator.cc
    ./audio_processing/aec3/decimator.cc
    ./audio_processing/aec3/dominant_nearend_detector.cc
    ./audio_processing/aec3/downsampled_render_buffer.cc
    ./audio_processing/aec3/echo_audibility.cc
    ./audio_processing/aec3/echo_canceller3.cc
    ./audio_processing/aec3/echo_path_delay_estimator.cc
    ./audio_processing/aec3/echo_path_variability.cc
    ./audio_processing/aec3/echo_remover.cc
    ./audio_processing/aec3/echo_remover_metrics.cc
    ./audio_processing/aec3/erle_estimator.cc
    ./audio_processing/aec3/erl_estimator.cc
    ./audio_processing/aec3/fft_buffer.cc
    ./audio_processing/aec3/fft_data_avx2.cc
    ./audio_processing/aec3/filter_analyzer.cc
    ./audio_processing/aec3/frame_blocker.cc
    ./audio_processing/aec3/fullband_erle_estimator.cc
    ./audio_processing/aec3/matched_filter.cc
    ./audio_processing/aec3/matched_filter_avx2.cc
    ./audio_processing/aec3/matched_filter_lag_aggregator.cc
    ./audio_processing/aec3/moving_average.cc
    ./audio_processing/aec3/refined_filter_update_gain.cc
    ./audio_processing/aec3/render_buffer.cc
    ./audio_processing/aec3/render_delay_buffer.cc
    ./audio_processing/aec3/render_delay_controller.cc
    ./audio_processing/aec3/render_delay_controller_metrics.cc
    ./audio_processing/aec3/render_signal_analyzer.cc
    ./audio_processing/aec3/residual_echo_estimator.cc
    ./audio_processing/aec3/reverb_decay_estimator.cc
    ./audio_processing/aec3/reverb_frequency_response.cc
    ./audio_processing/aec3/reverb_model.cc
    ./audio_processing/aec3/reverb_model_estimator.cc
    ./audio_processing/aec3/signal_dependent_erle_estimator.cc
    ./audio_processing/aec3/spectrum_buffer.cc
    ./audio_processing/aec3/stationarity_estimator.cc
    ./audio_processing/aec3/subband_erle_estimator.cc
    ./audio_processing/aec3/subband_nearend_detector.cc
    ./audio_processing/aec3/subtractor.cc
    ./audio_processing/aec3/subtractor_output.cc
    ./audio_processing/aec3/subtractor_output_analyzer.cc
    ./audio_processing/aec3/suppression_filter.cc
    ./audio_processing/aec3/suppression_gain.cc
    ./audio_processing/aec3/transparent_mode.cc
    ./audio_processing/aec3/vector_math_avx2.cc
    ./audio_processing/agc2/adaptive_agc.cc
    ./audio_processing/agc2/adaptive_digital_gain_applier.cc
    ./audio_processing/agc2/adaptive_mode_level_estimator.cc
    ./audio_processing/agc2/biquad_filter.cc
    ./audio_processing/agc2/compute_interpolated_gain_curve.cc
    ./audio_processing/agc2/cpu_features.cc
    ./audio_processing/agc2/down_sampler.cc
    ./audio_processing/agc2/fixed_digital_level_estimator.cc
    ./audio_processing/agc2/gain_applier.cc
    ./audio_processing/agc2/interpolated_gain_curve.cc
    ./audio_processing/agc2/limiter.cc
    ./audio_processing/agc2/limiter_db_gain_curve.cc
    ./audio_processing/agc2/noise_level_estimator.cc
    ./audio_processing/agc2/noise_spectrum_estimator.cc
    ./audio_processing/agc2/agc2_testing_common.cc
    ./audio_processing/agc2/rnn_vad/auto_correlation.cc
    ./audio_processing/agc2/rnn_vad/features_extraction.cc
    ./audio_processing/agc2/rnn_vad/lp_residual.cc
    ./audio_processing/agc2/rnn_vad/pitch_search.cc
    ./audio_processing/agc2/rnn_vad/pitch_search_internal.cc
    ./audio_processing/agc2/rnn_vad/rnn.cc
    ./audio_processing/agc2/rnn_vad/rnn_fc.cc
    ./audio_processing/agc2/rnn_vad/rnn_gru.cc
    # ./audio_processing/agc2/rnn_vad/rnn_vad_tool.cc
    ./audio_processing/agc2/rnn_vad/rnn_vector_math_avx2.cc
    ./audio_processing/agc2/rnn_vad/spectral_features.cc
    ./audio_processing/agc2/rnn_vad/spectral_features_internal.cc
    ./audio_processing/agc2/saturation_protector.cc
    ./audio_processing/agc2/saturation_protector_buffer.cc
    ./audio_processing/agc2/signal_classifier.cc
    ./audio_processing/agc2/vad_with_level.cc
    ./audio_processing/agc2/vector_float_frame.cc
    ./audio_processing/audio_buffer.cc
    ./audio_processing/echo_detector/circular_buffer.cc
    ./audio_processing/echo_detector/mean_variance_estimator.cc
    ./audio_processing/echo_detector/moving_max.cc
    ./audio_processing/echo_detector/normalized_covariance_estimator.cc
    ./audio_processing/gain_controller2.cc
    ./audio_processing/high_pass_filter.cc
    ./audio_processing/include/audio_processing.cc
    ./audio_processing/include/audio_processing_statistics.cc
    ./audio_processing/include/config.cc
    ./audio_processing/logging/apm_data_dumper.cc
    ./audio_processing/ns/fast_math.cc
    ./audio_processing/ns/histograms.cc
    ./audio_processing/ns/noise_estimator.cc
    ./audio_processing/ns/noise_suppressor.cc
    ./audio_processing/ns/ns_fft.cc
    ./audio_processing/ns/prior_signal_model.cc
    ./audio_processing/ns/prior_signal_model_estimator.cc
    ./audio_processing/ns/quantile_noise_estimator.cc
    ./audio_processing/ns/signal_model.cc
    ./audio_processing/ns/signal_model_estimator.cc
    ./audio_processing/ns/speech_probability_estimator.cc
    ./audio_processing/ns/suppression_params.cc
    ./audio_processing/ns/wiener_filter.cc
    ./audio_processing/residual_echo_detector.cc
    ./audio_processing/splitting_filter.cc
    ./audio_processing/three_band_filter_bank.cc
    ./audio_processing/utility/cascaded_biquad_filter.cc
    ./audio_processing/utility/delay_estimator.cc
    ./audio_processing/utility/delay_estimator_wrapper.cc
    ./audio_processing/utility/pffft_wrapper.cc
)

add_library(webrtc_audio_processing SHARED ${AUDIO_PROCESSING_SOURCE_LIST})